package fr.masterglr.website.googlr;

import com.google.soap.search.GoogleSearch;
import com.google.soap.search.GoogleSearchFault;
import com.google.soap.search.GoogleSearchResult;

public class GoogleAPI {

	/**
	 * @param args
	 */
	public static GoogleSearchResult doSearch(String keyword) {
		GoogleSearchResult result = null;
		GoogleSearch googleSearch = new GoogleSearch();
		googleSearch.setKey("v3Id+SJQFHJhpdIadvwsEnMTAP4NlRJD");
		googleSearch.setQueryString(keyword);
		googleSearch.setMaxResults(10);
		try {
			result = googleSearch.doSearch();
		} catch (GoogleSearchFault e) {
			e.printStackTrace();
		}
		return result;
	}
}